@charset "utf-8";
@import './core';

body {
  color: @base_color;
  font-size: @base_size;
  line-height: 1.7;
  font-family: Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
  -webkit-font-smoothing: subpixel-antialiased;
  background: @base_bg_color;
}

* {
  box-sizing: border-box;
}

html,
body,
#root {
  margin: 0;
  padding: 0;
}

#root {
  background: @admin_bg_color;

  .admin {
    .ant-layout-sider-collapsed {
      #logo {
        h1 {
          display: none;
        }
      }
    }

    #logo {
      height: 64px;
      position: relative;
      line-height: 64px;
      padding-left: 24px;
      transition: all 0.3s;
      background: #002140;
      overflow: hidden;

      img {
        display: inline-block;
        vertical-align: middle;
        height: 32px;
      }

      h1 {
        color: #fff;
        display: inline-block;
        vertical-align: middle;
        font-size: 24px;
        margin: 0 0 0 24px;
        font-weight: 600;
      }
    }

    .header-menu {
      line-height: 64px;
      margin-left: 50px;
      float: left;
    }

    .slider-menu {
      color: #fff;
      font-size: 28px;
      line-height: 64px;
      position: absolute;
      left: 20px;
      display: none;
    }

    .left-slider {
      width: 200px;
      background: #fff;
      overflow-y: 'auto';
      z-index: 10;

      .ant-layout-sider-children {
        display: flex;
        flex-direction: column;
      }

      .ant-menu {
        padding: 10px 0;
        flex: 1;
      }
    }

    .page-layout {
      padding: 88px 24px 24px;
    }

    .page-content {
      height: 100%;
      overflow: hidden;
      overflow-y: auto;
    }

    .page-content.default-mode.custom {
      background: unset;
      padding: unset;
    }

    .page-content.default-mode {
      background: #fff;
      padding: 24px;
    }

    .page-content.float-side-mode.custom {
      margin: -24px;
      padding: 24px;
      position: relative;

      .page-view {
        padding: unset;
        background: unset;
      }
    }

    .page-content.float-side-mode {
      margin: -24px;
      padding: 24px;
      position: relative;

      .page-view {
        height: 100%;
        padding: 24px;
        background: #fff;
      }

      .side-view {
        width: 0;
        background: #fff;
        transition: transform 0.3s;
        position: absolute;
        top: 0;
        bottom: 0;
        right: 0;
        z-index: 9;
        border-top: 1px solid #ddd;
        box-shadow: -2px 5px 5px #ddd;

        .close {
          position: absolute;
          cursor: pointer;
          width: 50px;
          height: 50px;
          text-align: center;
          line-height: 50px;
          top: 0;
          right: 0;
          color: @second_color;

          i {
            line-height: 50px;
          }
        }

        .close:hover {
          color: @base_color;
        }
      }
    }

    .page-content.side-mode.custom {
      margin: -24px;
      padding: 24px;
      padding-right: 0;
      position: relative;

      .page-view {
        padding: unset;
        background: unset;
        margin-right: 24px;
        overflow: hidden;
      }
    }

    .page-content.side-mode {
      margin: -24px;
      padding: 24px;
      padding-right: 0;
      background: unset;
      display: flex;
      flex-direction: row;

      .page-view {
        height: 100%;
        overflow-y: auto;
        padding: 24px;
        background: #fff;
        margin-right: 24px;
        flex: 1;
      }

      .side-view {
        width: 0;
        flex: unset;
        background: #fff;
        transition: width 0.3s;
        position: relative;

        .side-btn {
          text-align: center;
          position: absolute;
          top: 50%;
          left: -20px;
          transform: translateY(-50%);
          width: 20px;
          height: 100px;
          border-top: 1px solid #eee;
          border-left: 1px solid #eee;
          border-bottom: 1px solid #eee;
          border-top-left-radius: 5px;
          border-bottom-left-radius: 5px;
          background: #fff;
          line-height: 100px;
          cursor: pointer;
        }
      }
    }

    .page-content.all {
      .side-view {
        width: 100% !important;
      }
    }

    .page-content.error {
      background: #fff;
      padding-top: 80px;
      text-align: center;
      width: 100%;
      height: 100%;
      box-sizing: border-box;

      img.image {
        margin-top: 100px;
        width: 150px;
      }

      h3 {
        color: #444;
        margin: 30px;
      }
    }

    .plate-title {
      font-size: 20px;
      font-weight: 600;
      margin-bottom: 20px;
    }

    #module-menu {
      display: inline-block;
    }

    #right-layout {
      position: relative;
    }

    #layout-header {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      overflow: hidden;
      background: #fff;
      padding: 0;
      padding-right: 24px;
      z-index: 1;

      .trigger {
        vertical-align: top;
        font-size: 18px;
        line-height: 64px;
        padding: 0 24px;
        cursor: pointer;
        transition: all 0.3s;
      }

      .trigger:hover {
        background: @second_bg_color;
      }

      .user-info {
        line-height: 64px;
        padding: 0 15px;
        cursor: pointer;
        transition: all 0.3s;

        .avatar {
          margin-right: 5px;
        }
      }

      .user-info:hover {
        background: @second_bg_color;
      }

      .company-name {
        line-height: 64px;
        font-size: 20px;
        padding: 0 30px;
        cursor: pointer;
        transition: all 0.3s;

        .logo-wrapper {
          margin-right: 10px;
        }
      }

      .company-name:hover {
        background: @second_bg_color;
      }

      .icon {
        line-height: 64px;
        padding: 0 15px;
        cursor: pointer;
        transition: all 0.3s;
        display: inline-block;
        color: #444;

        .anticon {
          line-height: 30px;
          padding: 0 5px;
          font-size: 16px;
        }
      }

      .icon:hover {
        background: @second_bg_color;
      }
    }

    .ant-breadcrumb {
      margin-bottom: 10px;
    }
  }

  .header-top-title {
    line-height: 44px;
    font-size: 18px;
    padding-left: 24px;
    margin-bottom: 24px;
    background: #fff;
  }

}

/* use css to set position of modal */

.vertical-center-modal {
  text-align: center;
  white-space: nowrap;
}

.vertical-center-modal:before {
  content: '';
  display: inline-block;
  height: 100%;
  vertical-align: middle;
  width: 0;
}

.vertical-center-modal .ant-modal {
  display: inline-block;
  vertical-align: middle;
  top: 0;
  text-align: left;
}